package com.fileshare.web.constant;

import java.util.ArrayList;
import java.util.List;

public final class FileTypeConstant {
    //zip
    public static final String ZIP = "zip";
    public static final String JAR = "jar";
    //image
    public static final String JPG = "jpg";
    public static final String JPEG = "jpeg";
    public static final String PNG = "png";
    public static final String GIF = "gif";
    public static final String BMP = "bmp";
    public static final String ICO = "ico";
    //web
    public static final String SVG = "svg";
    public static final String XML = "xml";
    public static final String HTML = "html";
    public static final String JSON = "json";
    public static final String MARK_DOWN = "md";
    //media
    public static final String WAV = "wav";
    public static final String MP3 = "mp3";
    public static final String MP4 = "mp4";
    //application
    public static final String EXE = "exe";
    public static final String APK = "apk";
    //document
    public static final String EXCEL = "xls";
    public static final String EXCEL_X = "xlsx";
    public static final String DOC = "doc";
    public static final String DOC_X = "docx";
    public static final String TXT = "txt";
    public static final String TEXT = "text";
    public static final String PDF = "pdf";
    public static final String TIFF = "tiff";

    public static final List<String> allowFileTypes = new ArrayList<>();

    static {
        allowFileTypes.add(ZIP);
        allowFileTypes.add(JPG);
        allowFileTypes.add(JPEG);
        allowFileTypes.add(PNG);
        allowFileTypes.add(GIF);
        allowFileTypes.add(BMP);
        allowFileTypes.add(TIFF);
        allowFileTypes.add(EXCEL);
        allowFileTypes.add(EXCEL_X);
        allowFileTypes.add(DOC);
        allowFileTypes.add(DOC_X);
        allowFileTypes.add(TEXT);
        allowFileTypes.add(TXT);
        allowFileTypes.add(PDF);
        allowFileTypes.add(HTML);
        allowFileTypes.add(MARK_DOWN);
        allowFileTypes.add(EXE);
        allowFileTypes.add(APK);
        allowFileTypes.add(JAR);
        allowFileTypes.add(ICO);
        allowFileTypes.add(WAV);
        allowFileTypes.add(MP3);
        allowFileTypes.add(MP4);
        allowFileTypes.add(SVG);
        allowFileTypes.add(XML);
    }

    private FileTypeConstant() {

    }
}
